CFLAGS = -Wall -O2

all: program

program: main.o FunctionPtr.o Actions.o Functions.o
	g++ ${CFLAGS} main.o FunctionPtr.o Actions.o Functions.o -o program

main.o: main.cpp FunctionPtr.h
	g++ -c ${CFLAGS} main.cpp FunctionPtr.h

FunctionPtr.o: FunctionPtr.cpp FunctionPtr.h Functions.h
	g++ -c ${CFLAGS} FunctionPtr.cpp FunctionPtr.h Functions.h

Actions.o: Actions.cpp
	g++ -c ${CFLAGS} Actions.cpp

Functions.o: Functions.cpp Functions.h
	g++ -c ${CFLAGS} Functions.cpp Functions.h

run: program
	./program

clean:
	rm *.o
	rm *.h.gch
	rm program
